<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 产品分类 基类
 * @Entity
 * @Table(name="fa_procate", id={"id"})
 * @DDL("CREATE TABLE `fa_procate` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL COMMENT '分类名称',
  `image` varchar(255) DEFAULT NULL COMMENT '图片',
  `procate_id` int(10) DEFAULT '0' COMMENT '上级栏目',
  `weigh` int(10) unsigned DEFAULT NULL COMMENT '排序(数字越大越靠前）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='产品分类'")
 * @property int $id 
 * @property string $name 分类名称
 * @property string $image 图片
 * @property int $procateId 上级栏目
 * @property int $weigh 排序(数字越大越靠前）
 */
abstract class ProcateBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 分类名称
     * name
     * @Column(name="name", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $name;

    /**
     * 获取 name - 分类名称
     *
     * @return string
     */ 
    public function getName()
    {
        return $this->name;
    }

    /**
     * 赋值 name - 分类名称
     * @param string $name name
     * @return static
     */ 
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

    /**
     * 图片
     * image
     * @Column(name="image", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $image;

    /**
     * 获取 image - 图片
     *
     * @return string
     */ 
    public function getImage()
    {
        return $this->image;
    }

    /**
     * 赋值 image - 图片
     * @param string $image image
     * @return static
     */ 
    public function setImage($image)
    {
        $this->image = $image;
        return $this;
    }

    /**
     * 上级栏目
     * procate_id
     * @Column(name="procate_id", type="int", length=10, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $procateId;

    /**
     * 获取 procateId - 上级栏目
     *
     * @return int
     */ 
    public function getProcateId()
    {
        return $this->procateId;
    }

    /**
     * 赋值 procateId - 上级栏目
     * @param int $procateId procate_id
     * @return static
     */ 
    public function setProcateId($procateId)
    {
        $this->procateId = $procateId;
        return $this;
    }

    /**
     * 排序(数字越大越靠前）
     * weigh
     * @Column(name="weigh", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $weigh;

    /**
     * 获取 weigh - 排序(数字越大越靠前）
     *
     * @return int
     */ 
    public function getWeigh()
    {
        return $this->weigh;
    }

    /**
     * 赋值 weigh - 排序(数字越大越靠前）
     * @param int $weigh weigh
     * @return static
     */ 
    public function setWeigh($weigh)
    {
        $this->weigh = $weigh;
        return $this;
    }

}
